<template>
	<view class="all">
		<!-- 标题 -->
		<view class="title">
			<text>我的收藏</text>
			<text @click="displayDel" v-if="isChange==1">编辑</text>
			<text @click="displayChange" v-if="isChange==2">完成</text>
		</view>
		<!-- 内容 -->
		<view class="content">
			<view class="content-one">
				<view class="choose">
					<text v-if="isYes==1" class="iconfont icon-zhengquequeding-copy" @click="changeYes(2)"></text>
					<text v-if="isYes==2" class="iconfont icon-zhengquequeding red" @click="changeYes(1)"></text>
				</view>
				<image src="../../static/images/cys/mine-3.jpg" mode=""></image>
				<view class="content-text">
					<text>2018年新款冲锋衣秋冬款新品推荐 户外冲锋衣</text>
					<text>￥229</text>
				</view>
				<image src="../../static/images/cys/mine-2.webp" mode=""></image>
			</view>
		</view>
		<view class="content">
			<view class="content-one">
				<image src="../../static/images/cys/mine-3.jpg" mode=""></image>
				<view class="content-text">
					<text>2018年新款冲锋衣秋冬款新品推荐 户外冲锋衣</text>
					<text>￥229</text>
				</view>
				<image src="../../static/images/cys/mine-2.webp" mode=""></image>
			</view>
		</view>
		<!-- 底部管理栏 -->
		<view class="last" v-if="isDel==1">
			<text class="iconfont icon-zhengquequeding-copy">全选</text>
			<!-- <text>全选</text> -->
			<text @click="show = true">删除</text>
		</view>
		<!-- 删除 -->
		<u-modal :show="show" :title="title"  :showCancelButton='true'   :content='content' @cancel="cancel"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isYes: 0,
				isDel:0,
				isChange:1,
				show: false,
				title: '',
				content: '确认删除所选商品吗',
			}
		},
		methods: {
			changeYes(e) {
				this.isYes = e
			},
			cancel(){
				this.show = false
				
				// this.isDel = 0
			},
			displayDel(){
				this.isDel = 1
				this.isChange = 2
				this.isYes = 1
			},
			displayChange(){
				this.isDel = 0
				this.isChange = 1
				this.isYes = 0
			}
		}
	}
</script>

<style>
	.all {
		width: 750rpx;
		margin: auto;
	}

	.title {
		width: 750rpx;
		height: 90rpx;
		line-height: 100rpx;
		margin-top: 30rpx;
		display: flex;
		border-bottom: 2px solid #EAEAEA;
	}

	.title>text:nth-of-type(1) {
		margin-left: 300rpx;
	}

	.title>text:nth-of-type(2) {
		font-size: 12px;
		margin-top: 4rpx;
		margin-left: 220rpx;
	}

	.content {
		width: 700rpx;
		margin: auto;
		/* padding-top:30rpx */
	}

	.content-one {
		width: 700rpx;
		height: 220rpx;
		display: flex;
		margin-top: 20rpx;
		border-bottom: 1px solid #F4F4F4;
	}

	.content-text {
		width: 350rpx;
		margin-top: 20rpx;
	}

	.content-text>text:nth-of-type(1) {
		font-size: 13px;
		display: block;
	}

	.content-text>text:nth-of-type(2) {
		font-size: 13px;
		margin-top: 40rpx;
		display: block;
	}

	.content-one>image:nth-of-type(1) {
		width: 200rpx;
		height: 200rpx;
		margin-right: 15rpx;
	}

	.content-one>image:nth-of-type(2) {
		width: 150rpx;
		height: 150rpx;
		margin-top: 25rpx;
	}

	.red {
		color: red;
	}

	.choose {
		margin: auto;
	}

	.last {
		width: 750rpx;
		height: 120rpx;
		display: flex;
		line-height: 120rpx;
		position: fixed;
		bottom: 0;
	}

	.last>text:nth-of-type(1) {
		width: 560rpx;
		height: 120rpx;
		padding-left: 20rpx;
		font-size: 16px;
		/* text-align: center; */
		background-color: #999999;
		display: block;
		color: #DBDBDB;
	}

	.last>text:nth-of-type(2) {
		width: 190rpx;
		height: 120rpx;
		font-size: 16px;
		text-align: center;
		background-color: #FF0000;
		display: block;
		color: white;
	}
</style>
